﻿<!--#include file="const.asp"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%
if sid="Null" then
	Response.Redirect "login.asp"
	Response.end
end if

dim Page,PageSize

	PageSize=15

	dim rs,sql,i,tid,id

    	Page = Request("page")      '当前页数
    	If Page = "" Then Page = 1
   	If Not IsNumeric(Page) Then Page = 1
    	Page = CLng(Page)
    	If Page < 1 Then Page = 1
    	id = Request("id")      '当前页数
    	If id = "" Then id = 1
   	If Not IsNumeric(id) Then id = 1
    	id = CLng(id)

        tid=Request("tid")
        if tid=1 then 
		set rs=Server.CreateObject("ADODB.Recordset")
		Sql = "select top 1 id  FROM qingtian_jilu where id="&id&""
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
		rs.delete
		end if
		rs.Close
		Set rs = Nothing
        end if
		%><card title="冲值记录"><p align="left"><%



	Set Rs = Server.CreateObject("Adodb.Recordset")

	Sql = "select  a.id,a.name,a.pass,a.money,a.ext,a.time,a.Order,a.zftime,b.name from qingtian_jilu a,qingtian_user b   where a.nid=b.id  order by a.id  desc"
	Rs.Open Sql,conn,1,1


	if not (rs.bof and rs.eof)  then
				Rs.PageSize = PageSize	'一页N条记录
				IF Not IsEmpty(Page) Then
					IF Not IsNumeric(Page) Then		'判断Page是否为数字
						Page=1
					Else
						Page=Cint(Page)		'转换成短整形Integer
					End IF
					IF Page > Rs.PageCount Then
						Rs.AbsolutePage = Rs.PageCount	'设置当前显示页等于最后一页
					ElseIF Page <= 0 Then
						Rs.AbsolutePage = 1		'设置当前页等于第一页
					Else
						Rs.AbsolutePage = Page	'如果大于零,显示当前页等于接收的页数
					End IF
				Else
					Rs.AbsolutePage = 1
				End IF
				Page = Rs.AbsolutePage


		For i=1 to Rs.PageSize
			If Rs.Eof Then
				exit For
			End If


		%><%=i+(page-1)*PageSize%>.<%
				%>
				定单号:<%=qingtian.utf8(rs("Order"))%><br/>
				冲值会员:<%=qingtian.utf8(rs("b.name"))%><br/>
				冲值金额:<%=qingtian.utf8(rs("money"))%>元<br/>
				卡号:<%=qingtian.utf8(rs("a.name"))%><br/>
				密码:<%=qingtian.utf8(rs("pass"))%><br/>
				冲值时间:<%=qingtian.utf8(rs("time"))%><br/>
				到帐时间:<%=qingtian.utf8(rs("zftime"))%><br/>
				冲值状态:<%
				select case rs("ext")
				case 1
					%>冲值成功!<br/><%
				case 2
					%>冲值失败!非银行卡密无效!<br/><%
				case 7
					%>冲值失败!非银行卡密无效!<br/><%
				case 11
					%>冲值失败!商户订单号重复!<br/><%
				case 61
					%>冲值失败!您的账号尚未开通!<br/><%
				case else
					%>提交失败!<br/><%
				end select

    		    Response.Write("[<a href='conjilu.asp?tid=1&amp;id="&rs("id")&"&amp;sid=" & sid & "'>删除记录</a>]<br/>")

		Rs.MoveNext
		Next

       
    		'分页
    		If Page < rs.PageCount Then
    		    Response.Write("<a href='conjilu.asp?page=" & Page + 1 & "&amp;sid=" & sid & "'>下一页</a>")
    		End If
       
    		If Page > 1 And Page < rs.PageCount Then
    		    Response.Write("|")
    		End If
        
    		If Page > 1 Then
    		    Response.Write("<a href='conjilu.asp?page=" & Page - 1 & "&amp;sid=" & sid & "'>上一页</a><br/>")
    		Elseif rs.PageCount >1 then
    		    Response.Write("<br/>")
    		End If
            
    		Randomize()
    
    		If rs.PageCount > 2 Then
    		    Response.Write("<input name='Page' format='*N' size='5' maxlength='5'/>")
    		    Response.Write("<anchor>跳页")
    		    Response.Write("<go href='conjilu.asp.asp?run=" & Int((9999) * Rnd() + 1) & "&amp;sid=" & sid & "' method='post'>")
    		    Response.Write("<postfield name='Page' value='$(Page:n)' />")
    		    Response.Write("</go></anchor><br/>")
    		End If
                                                                
    		Response.Write("(第" & Page & "/总" & rs.PageCount & "页/" & rs.RecordCount & "条)<br/>")

	else
		%>没有冲值记录<br/><%
	end if
	Rs.close
	set rs=nothing

   		Response.Write("<a href='index.asp?sid=" & sid & "'>管理首页</a><br/>")
end Function
%>
